//
//  WmcAlbumProjectsCell.swift
//  YPWatermarkCamera
//
//  Created by 赵新 on 2022/3/22.
//

import Photos
import UIKit

class WmcSystemAlbumCell: WmcBaseCollectionCell {
    override func makeUI() {
        
        imageView.layer.cornerRadius = 4
        imageView.layer.masksToBounds = true
        addSubview(imageView)
        imageView.snp.makeConstraints { make in
            make.edges.equalToSuperview()
        }
    }

    func configAsset(_ asset: PHAsset) {
        // 加载
        let size = (Wmc_screenWidth / 3).yp.cgSize
        WmcAlbumManager.asyncLoadImage(asset: asset, photoSize: size) { [weak self] image in
            guard let weakSelf = self else { return }
            weakSelf.imageView.image = image
        }
    }
}
